<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<style>
    .welcome .layui-card {border:1px solid #f2f2f2;border-radius:5px;}
    .welcome .icon {margin-right:10px;color:#1aa094;}
    .welcome .icon-cray {color:#ffb800 !important;}
    .welcome .icon-blue {color:#1e9fff !important;}
    .welcome .icon-tip {color:#ff5722 !important;}
    .welcome .layuimini-qiuck-module {text-align:center;margin-top:10px}
    .welcome .layuimini-qiuck-module a i {display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s;}
    .welcome .layuimini-qiuck-module a cite {position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px;}
    .welcome .welcome-module {width:100%;height:210px;}
    .welcome .panel {background-color:#fff;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}
    .welcome .panel-body {padding:10px}
    .welcome .panel-title {margin-top:0;margin-bottom:0;font-size:12px;color:inherit}
    .welcome .label {display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em;margin-top:.3em;}
    .welcome .layui-red {color:red}
    .welcome .main_btn > p {height:40px;}
    .welcome .layui-bg-number {background-color:#F8F8F8;}
    .welcome .layuimini-notice:hover {background:#f6f6f6;}
    .welcome .layuimini-notice {padding:7px 16px;clear:both;font-size:12px !important;cursor:pointer;position:relative;transition:background 0.2s ease-in-out;}
    .welcome .layuimini-notice-title,.layuimini-notice-label {padding-right:70px !important;text-overflow:ellipsis !important;overflow:hidden !important;white-space:nowrap !important;}
    .welcome .layuimini-notice-title {line-height:28px;font-size:14px;}
    .welcome .layuimini-notice-extra {position:absolute;top:50%;margin-top:-8px;right:16px;display:inline-block;height:16px;color:#999;}
</style>
<div class="layuimini-container layuimini-page-anim">
    <div class="layuimini-main welcome">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <div class="layui-row layui-col-space15">
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-warning icon"></i>数据统计模拟</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10">
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-blue">实时</span>
                                                        <h5>用户统计</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <h1 class="no-margins">1234</h1>
                                                        <small>当前分类总记录数</small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-cyan">实时</span>
                                                        <h5>成员统计</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <h1 class="no-margins">1234</h1>
                                                        <small>当前分类总记录数</small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-orange">实时</span>
                                                        <h5>赛事统计</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <h1 class="no-margins">1234</h1>
                                                        <small>当前分类总记录数</small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-col-xs6">
                                            <div class="panel layui-bg-number">
                                                <div class="panel-body">
                                                    <div class="panel-title">
                                                        <span class="label pull-right layui-bg-green">实时</span>
                                                        <h5>专业统计</h5>
                                                    </div>
                                                    <div class="panel-content">
                                                        <h1 class="no-margins">1234</h1>
                                                        <small>当前分类总记录数</small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-credit-card icon icon-blue"></i>快捷入口模拟</div>
                            <div class="layui-card-body">
                                <div class="welcome-module">
                                    <div class="layui-row layui-col-space10 layuimini-qiuck">
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/college/collegeManager.jsp" data-title="院系查询" data-icon="fa fa-institution">
                                                <i class="fa fa-institution"></i>
                                                <cite>院系查询</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/college/majorManager.jsp" data-title="专业查询" data-icon="fa fa-group">
                                                <i class="fa fa-group"></i>
                                                <cite>专业查询</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/member/memberManager.jsp" data-title="成员查询" data-icon="fa fa-user-plus">
                                                <i class="fa fa-user-plus"></i>
                                                <cite>成员查询</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/member/memberStatistics.jsp" data-title="成员统计" data-icon="fa fa-pie-chart">
                                                <i class="fa fa-pie-chart"></i>
                                                <cite>成员统计</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/competition/competitionManager.jsp" data-title="赛事查询" data-icon="fa fa-trophy">
                                                <i class="fa fa-trophy"></i>
                                                <cite>赛事查询</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/openClass/openClassManager.jsp" data-title="公开课查询" data-icon="fa fa-snowflake">
                                                <i class="fa fa-hourglass-3"></i>
                                                <cite>公开课查询</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/credits/creditsQuery.jsp" data-title="学分查询" data-icon="fa fa-search">
                                                <i class="fa fa-search"></i>
                                                <cite>学分查询</cite>
                                            </a>
                                        </div>
                                        <div class="layui-col-xs3 layuimini-qiuck-module">
                                            <a href="javascript:;" layuimini-content-href="page/credits/creditsManager.jsp" data-title="学分统计" data-icon="fa fa-bar-chart-o">
                                                <i class="fa fa-bar-chart-o"></i>
                                                <cite>学分统计</cite>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-col-md12">
                        <div class="layui-card">
                            <div class="layui-card-header"><i class="fa fa-line-chart icon"></i>报表统计</div>
                            <div class="layui-card-body">
                                <div id="pienum" style="width: 100%; height: 400px;"></div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

            <div class="layui-col-md4">

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-bullhorn icon icon-tip"></i>系统公告</div>
                    <div class="layui-card-body layui-text">
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">新增首页的些许功能</div>
                            <div class="layuimini-notice-extra">2020-12-22 13:23</div>
                            <div class="layuimini-notice-content layui-hide">
                                图表一览，数据信息简洁明了。<br>
                                可以通过几个可输入的选项来搜索图标。<br>
                                支持饼图，柱状图。<br>
                                刷新页面会保留当前的窗口，并且会定位当前窗口对应左侧菜单栏。<br>
                                移动端的友好支持。<br>
                            </div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">新增功能成员统计</div>
                            <div class="layuimini-notice-extra">2020-12-22 13:23</div>
                            <div class="layuimini-notice-content layui-hide">
                                图表一览，数据信息简洁明了。<br>
                                可以通过几个可输入的选项来搜索图标。<br>
                                支持饼图，柱状图。<br>
                                支持学院，年级，专业，状态等多项搜索条件。<br>
                                优化了用户使用图表功能时的动画体验。<br>
                                更新了图表的颜色，使其看起来更加好看。<br>
                            </div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">新增功能创新学分统计</div>
                            <div class="layuimini-notice-extra">2020-12-22 13:23</div>
                            <div class="layuimini-notice-content layui-hide">
                                以表格的方式来统计数据信息，更直观更明了。<br>
                                新增根据时间段查找学分数据。<br>
                                优化了表格的外观。<br>
                            </div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">优化了字体图表以及部分图标的外观</div>
                            <div class="layuimini-notice-extra">2020-12-22 13:23</div>
                            <div class="layuimini-notice-content layui-hide">
                                将主页菜单栏的所有字体图标全部更新。<br>
                                更新了首页快捷入口的所有字体图标。<br>
                                更新了系统的主页logo。<br>
                            </div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">修复点击首页出现404的问题</div>
                            <div class="layuimini-notice-extra">2020-12-22 13:23</div>
                            <div class="layuimini-notice-content layui-hide">
                                修复点击首页出现404的问题。<br>
                            </div>
                        </div>
                        <div class="layuimini-notice">
                            <div class="layuimini-notice-title">更新了单页面</div>
                            <div class="layuimini-notice-extra">2020-12-22 13:23</div>
                            <div class="layuimini-notice-content layui-hide">
                                更新了单页面。<br>
                                界面比原先的多页面更加清爽。<br>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-fire icon"></i>版本信息</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table">
                            <colgroup>
                                <col width="100">
                                <col>
                            </colgroup>
                            <tbody>
                            <tr>
                                <td>系统名称</td>
                                <td>
                                    UOLab管理系统
                                </td>
                            </tr>
                            <tr>
                                <td>当前版本</td>
                                <td>v1.0.1</td>
                            </tr>
                            <tr>
                                <td>主要特色</td>
                                <td>功能强大 / 响应式 / 清爽 / 极简</td>
                            </tr>
                            <tr>
                                <td>开发者</td>
                                <td>原玉波</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="layui-card">
                    <div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>程序员 原 要说的话</div>
                    <div class="layui-card-body layui-text layadmin-text">
                        <p>技术交流QQ群  英才科技Java1021班（516450248）：<a target="_blank" href="https://jq.qq.com/?_wv=1027&k=1Yqgijgf"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="layuimini" title="layuimini"></a>（加群请备注学校-姓名：如科大-原玉波）</p>                   </div>
                </div>

            </div>
        </div>
    </div>
</div>

<script src="js/lay-module/echarts/echarts.js" charset="utf-8"></script>
<script src="js/lay-module/echarts/echartsTheme.js" charset="utf-8"></script>
<script src="lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="lib/jq-module/paigusu.min.js" charset="utf-8"></script>

<script>
    layui.use(['layer','echarts'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            echarts = layui.echarts;

        /**
         * 查看公告信息
         **/
        $('body').on('click', '.layuimini-notice', function () {
            var title = $(this).children('.layuimini-notice-title').text(),
                noticeTime = $(this).children('.layuimini-notice-extra').text(),
                content = $(this).children('.layuimini-notice-content').html();
            var html = '<div style="padding:15px 20px; text-align:justify; line-height: 22px;border-bottom:1px solid #e2e2e2;background-color: #2f4056;color: #ffffff">\n' +
                '<div style="text-align: center;margin-bottom: 20px;font-weight: bold;border-bottom:1px solid #718fb5;padding-bottom: 5px"><h4 class="text-danger">' + title + '</h4></div>\n' +
                '<div style="font-size: 12px">' + content + '</div>\n' +
                '</div>\n';
            parent.layer.open({
                type: 1,
                title: '系统公告' + '<span style="float: right;right: 1px;font-size: 12px;color: #b1b3b9;margin-top: 1px">' + noticeTime + '</span>',
                area: '300px;',
                shade: 0.8,
                id: 'layuimini-notice',
                btn: ['查看', '取消'],
                btnAlign: 'c',
                moveType: 1,
                content: html,
                success: function (layero) {
                    var btn = layero.find('.layui-layer-btn');
                    btn.find('.layui-layer-btn0').attr({
                        target: '_blank'
                    });
                }
            });
        });

        /**
         * 图表统计
         */
        var echarts_pienum = echarts.init(document.getElementById('pienum'), 'walden');

        // 成员人数统计饼图
        var pienum = {
            title : {
                text: '根据各年级统计成员人数饼图',
                x:'center'
            },
            tooltip : {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                left: 'left',
                data: ['大一','大二','大三','大四','毕业']
            },
            series : [
                {
                    name: '成员来源',
                    type: 'pie',
                    radius : '75%',
                    center: ['50%', '60%'],
                    data:[
                        {value:335, name:'大一'},
                        {value:560, name:'大二'},
                        {value:800, name:'大三'},
                        {value:300, name:'大四'},
                        {value:150, name:'毕业'}
                    ],
                    itemStyle: {
                        emphasis: {
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                        }
                    }
                }
            ]
        };

        echarts_pienum.setOption(pienum);
        // echarts 窗口缩放自适应
        window.onresize = function() {
            echarts_pienum.resize();
        }

    });
</script>
